﻿
//Array, extends the default Array object.
LightScript.using("LightScript.Core", function()
{
    var thisClass = LightScript.Core.createClass("LightScript.Array");

    //# Private Members

    //# Constructions

    //# Public Members
    thisClass.pushList = pushList;
    function pushList(source, list)
    {
         //concat only works for Array
        for (var i = 0, len = list.length; i < len; i++)
            source.push(list[i]);
    }

    thisClass.pushAny = pushAny;
    function pushAny(source, obj)
    {
        if(!isNaN(obj.length) && obj.length >= 0)    //Any enumerable object
            pushList(source, obj);
        else
            source.push(obj);
     }

    //# Private Methods

    //# Public Methods

    //# Shortcuts
});
